package day14_io.demo04_OutputStream;

import java.io.FileInputStream;
import java.io.InputStreamReader;

//InputStreamReader
//void read()	读一个字符
//void read(char[] cbuf,int offset,int len)	将字符读入数组的一部分
public class Demo02_InputStreamReader {
    public static void main(String[] args) throws Exception{
        InputStreamReader isr = new InputStreamReader(new FileInputStream("E:\\csw\\Demo\\csw1\\csw3.txt"));
//        int read = isr.read();
//        System.out.println((char) read);//读一个字符
        char[] c = new char[1024];
        int read = isr.read(c, 2, 7);//表示把c中字符写在索引为2长度最多为c的长度
        System.out.println(read);
        isr.close();
    }
}
